<?php
namespace Model;

use Sfsn\Core\Model\Model;
class Member extends Model
{
    public $filter = 'trim';
    public $rules = [
        'username' => [
            'required',
            'unique',
        ],
//         'name' => [
//             'required'
//         ],
        'password' => [
            'required'
        ]
    
    ];
    
    public $message = [
        'username' => [
            'required'=>'请填写用户名',
            'unique'=>'用户名已被注册',
        ],
//         'name' => [
//             'required'=>'请填写姓名'
//         ],
        'password' => [
            'required'=>'请填写密码'
        ]
    ];
    public function custom()
    {
        return [
            'regdate'=>time(),
            ];
    }
        
    public function tableName()
    {
        return 'member';
    }
}
